package cn.lucky.面试题;

import java.util.Objects;

/**
 * @author lucky
 */
public class Test01 {
    public static void main(String[] args) {
        People a,b,c;
        a = new People(100L);
        b = new People(100L);
        c = b;
        long e = 100L;
        System.out.println(a==b);
//        System.out.println(e==a);
        System.out.println(b==c);
        System.out.println(a.equals(e));
    }
}

class People{
    long width;
    public People(long l){
        width = l;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof People)) return false;
        People people = (People) o;
        return width == people.width;
    }

}
